<!-- include tpl=usercp/header -->
<div class="container">
	<div class="row m-3">
		<div class="col-2">
			<!-- include tpl=usercp/left -->
		</div>
		<div class="col-10">
			<div class="card">
				<div class="card-header">
					资源管理器<!-- if $rs.title -->：{$rs.title}<!-- /if -->
					<div class="float-end">
						{$button}
					</div>
				</div>
				<table class="table mb-0">
				<thead>
					<tr>
						<th>ID</th>
						<th width="70px" class="text-center">图片</th>
						<th>信息</th>
						<td>上传时间</td>
						<th width="120">操作</th>
					</tr>
				</thead>
				<tbody>
					<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
					<tr>
						<td scope="row">{$value.id}</td>
						<td><img src="{$value.ico}" class="w-100" /></td>
						<td>
							<div><a href="{$value.filename}" target="_blank">{$value.title}</a></div>
							<!-- if $value.attr -->
							<div><small>
								<!-- loop from=$value.attr key=$k value=$v id=$idxx -->
								{$k}：{$v}<!-- if $idxx.num != $idxx.total -->，<!-- /if -->
								<!-- /loop -->
								</small>
							</div>
							<!-- /if -->
						</td>
						<td><small>{func time_format $value.addtime}</small></td>
						<td>
							<button type="button" onclick="$.common.res_rename('{$value.id}','{$value.title}')" class="btn btn-primary btn-sm">改名</button>
							<button type="button" onclick="$.common.res_delete('{$value.id}')" class="btn btn-danger btn-sm">删除</button>
						</td>
					</tr>
					<!-- /loop -->
				</tbody>
				</table>
			</div>			
			<div class="m-2"><!-- include tpl=usercp/pagelist --></div>
		</div>
	</div>
</div>
<!-- include tpl=usercp/footer -->